﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace CommonManagement
{
    /// <summary>
    /// 余额控制器
    /// </summary>
    [Authorize]
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/commonManagement/orders")]
    public class OrderController : AbpController, IOrderAppService
    {
        private readonly IOrderAppService _orderAppService;

        public OrderController(
            IOrderAppService orderAppService)
        {
            _orderAppService = orderAppService;
        }

        // 1.10.1 获取系统当前人全部订单
        [HttpGet]
        [Route("list")]
        public Task<ListResponse<OrderDto>> PagedListAsync(PagedListRequest request, 
            string name = null, 
            string orderNo = null, 
            string orderStatus = null, 
            string orderType = null, 
            string payTime = null)
        {
            return _orderAppService.PagedListAsync(request, name, orderNo, orderStatus, orderType, payTime);
        }
    }
}